include_directories("D:/Program Files/Microsoft DirectX SDK (June 2010)/Include")
link_directories("D:/Program Files/Microsoft DirectX SDK (June 2010)/Lib/x86")

set(ENGINE_LIB Engine2D)
set(SRCS 
    dxgame.cpp  
    dxgamegraphic.cpp 
    dxgameinput.cpp 
    dxsurface.cpp 
    dxsprite.cpp 
    logger.cpp
    animation.cpp 
    text.cpp)
if (MSVC_IDE)
    set(SRCS ${SRCS} 
        game.h
        dxgame.h
        dxgamegraphic.h
        dxgameinput.h
        dxsurface.h
        dxsprite.h
        logger.h
        animation.h
        text.h
        quadnode
        quadtree)
endif (MSVC_IDE)
set(LINKED_LIBS d3d9 d3dx9 dinput8 dxguid)

add_library(${ENGINE_LIB} ${SRCS})
target_link_libraries(${ENGINE_LIB} ${LINKED_LIBS})

if (NOT MSVC_IDE)
    if (BUILD_SHARED_LIBS)
        set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR})
        install(TARGETS Engine2D DESTINATION ./)
    endif (BUILD_SHARED_LIBS)
endif (NOT MSVC_IDE)


